1. Field of the Invention
Apparatuses and methods consistent with the present invention relate to intraprediction of a video, and more particularly, to video intraprediction encoding and decoding using pixel information of a current block through directional interpolation in video intraprediction.
2. Description of the Related Art
The H.264/Moving Picture Expert Group (MPEG)-4/Advanced Video Coding (AVC) standard is a video compression standard which adopts various techniques such as multiple reference motion compensation, loop filtering, variable block size motion compensation, and context adaptive binary arithmetic coding (CABAC) for the purpose of improving compression efficiency.
According to the H.264 standard, a picture is divided into macroblocks for video encoding. After each of the macroblocks is encoded in all interprediction and intraprediction encoding modes, an appropriate encoding mode is selected according to the bit rate required for encoding the macroblock and the allowable distortion between the original macroblock and the decoded macroblock. Then the macroblock is encoded in the selected encoding mode.
In intraprediction, instead of referring to reference pictures, a prediction value of a macroblock to be encoded is calculated using the value of a pixel that is spatially adjacent to the macroblock to be encoded, and the difference between the prediction value and the pixel value is encoded when encoding macroblocks of the current picture. Intraprediction modes are divided into 4×4 intraprediction modes for luminance components, 8×8 intraprediction modes (in case of a high profile), 16×16 intraprediction modes, and an intraprediction mode for chrominance components.
FIG. 1 illustrates 16×16 intraprediction modes for luminance components according to the H.264 standard, and FIG. 2 illustrates 4×4 intraprediction modes for luminance components according to the H.264 standard.
Referring to FIG. 1, there are four 16×16 intraprediction modes, i.e., a vertical mode 0, a horizontal mode 1, a direct current (DC) mode 2, and a plane mode 3. Referring to FIG. 2, there are nine 4×4 intraprediction modes, i.e., a vertical mode 0, a horizontal mode 1, a DC mode 2, a diagonal down-left mode 3, a diagonal down-right mode 4, a vertical-right mode 5, a horizontal-down mode 6, a vertical-left mode 7, and a horizontal-up mode 8.
For example, when a 4×4 current block is prediction encoded in a mode 0, i.e., the vertical mode of FIG. 2, pixel values of pixels A through D adjacent above the 4×4 current block are predicted to be the pixel values of the 4×4 current block. In other words, the pixel value of the pixel A is predicted to be the pixel values of the four pixels of the first column of the 4×4 current block, the pixel value of the pixel B is predicted to be the pixel values of the four pixels of the second column of the 4×4 current block, the pixel value of the pixel C is predicted to be the pixel values of the four pixels of the third column of the 4×4 current block, and the pixel value of the pixel D is predicted to be the pixel values of the four pixels of the fourth column of the 4×4 current block. Next, the difference between the pixel values of pixels of the 4×4 current block predicted using the pixels A through D and the actual pixel values of pixels included in the original 4×4 current block is obtained and encoded.
In video encoding according to the H.264 standard, the current macroblock is encoded in a total of 13 modes including the 4×4 intraprediction modes and the 16×16 intraprediction modes and is then intraprediction encoded in the encoding mode having the smallest cost. This means that the current macroblock is intrapredicted in the four 16×16 intraprediction modes and the one having the smallest cost is selected. Each of the 4×4 sub-blocks of the current macroblock is intrapredicted in the nine 4×4 intraprediction modes, and the one having the smallest cost is selected for each sub-block. The cost of the selected 16×16 intraprediction mode and the sum of the costs of the selected 4×4 intraprediction modes are compared, and the mode having the smallest cost is selected.
In this way, intraprediction according to the related art uses pixels sampled from neighboring blocks of the current block to be intrapredicted, instead of using pixels included in the current block. As a result, when the video of the current block is very different from that of the neighboring blocks, the difference between an intrapredicted block and an actual block may be large. Since intraprediction according to the related art uses only pixel information of neighboring blocks without using pixel information of the current block to be intrapredicted, prediction and coding efficiency are limited.